package com.itheima.service;

import com.itheima.entity.PageResult;
import com.itheima.entity.QueryPageBean;
import com.itheima.pojo.Menu;
import com.itheima.pojo.Permission;
import com.itheima.pojo.Role;

import java.util.List;

/**
 * @Program: health_parent
 * @Description:
 * @Author: choulan
 * @Date:2020-11-23 10:32
 **/
public interface RoleService {
    //分页查询
    public PageResult findPage(QueryPageBean queryPageBean);
    //获取权限菜单
    public List<Permission> findAuthority();
    //获取菜单信息
    public List<Menu> findMenu();
    //添加角色
    public void add(Role role, Integer[] authorityIds, Integer[] menuIds);
    //查询角色信息
    public Role findById(Integer id);
    //查询角色菜单信息
    public List<Integer> findMenuIdsByRoleId(Integer id);
    //查询角色权限信息
    public List<Integer> findAuthorityIdsByRoleId(Integer id);
    //编辑角色信息
    public void edit(Role role, Integer[] authorityIds, Integer[] menuIds);
    //删除角色信息
    public void delete(Integer id);
    //查询所有的角色信息
    public List<Role> findAll();
    //校验角色名重复与否
    public boolean checkName(String name);
}
